#CC = g++
BUILDDIR=../../.build
CC ?= gcc

CFLAGS = -shared -std=c99

#CFLAGS += -I${BUILDDIR}/include -shared -DDEBUG=1 
#LDFLAGS += -L${BUILDDIR}/lib -ljs_static

#NSPR_CFLAGS != ${BUILDDIR}/bin/nspr-config --cflags
#NSPR_LDFLAGS != ${BUILDDIR}/bin/nspr-config --libs

#JS_CFLAGS != ${BUILDDIR}/bin/js-config --cflags
#JS_LDFLAGS != ${BUILDDIR}/bin/js-config --libs

CFLAGS += ${NSPR_CFLAGS} ${JS_CFLAGS}
LDFLAGS += ${NSPR_LDFLAGS} ${JS_LDFLAGS}


.SUFFIXES: .so

.c.so:
	${CC} ${CFLAGS} ${LDFLAGS} -o $@ $<

#all:
#	echo NSPR_CFLAGS=${NSPR_CFLAGS}


all: test1.so

test1.c: test1.h

clean:
	rm -rf *.so *.o


#include ../../mk/so.mk
